<div id="openmain">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="ntModalLabel">{:lang('add/alterar_contact')}</h4>
    </div>
    <div class="modal-body">
        <div class="row clearfix">
            <div class="col-md-12 column">
                <div class="alert alert-dismissable alert-info">
                    <button type="button" class="close">×</button>
                    <p></p>
                </div>
                <table class="table table-striped table-hover ntTable" v-cloak>
                    <tbody>
                    <tr>
                        <td>{:lang('name')}<span class="required"></span></td>
                        <td colspan="3">
                            <div class="input-group" style="width:100%">
                                <input type="text" class="form-control" v-model="name">
                                <span class="input-group-addon">
                                    <input type="checkbox" v-model="is_main" value="1"> {:lang('main')}
                                </span>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>{:lang('job')}<span class="required"></span></td>
                        <td><input type="text" class="form-control" v-model="position"></td>
                        <td>{:lang('gender')}<span class="required"></span></td>
                        <td>
                            <label class="radio-inline">
                                <input type="radio" name="sex" v-model="sex" value="1" checked> {:lang('man')}
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="sex" v-model="sex" value="0" value=""> {:lang('woman')}
                            </label>
                        </td>
                    </tr>
                    <tr>
                        <td>{:lang('contact_information')}<span class="required"></span></td>
                        <td colspan="3">
                            <div class="input-group" style="width:100%">
                                <div class="input-group-btn" style="width: 150px;">
                                    <select name="" id="sellinkfun" class="form-control" v-model="sellinkfun">
                                        <option value="0">{:lang('please_select')}</option>
                                        <option :value="item.id" v-for="(item,index) in linkfun">{{item.option_text}}
                                        </option>
                                    </select>
                                </div>
                                <input type="text" class="form-control" v-model="linkval">
                                <div class="input-group-btn">
                                    <button type="button" class="btn btn-primary" @click="addlink">
                                        <span class="glyphicon glyphicon-plus"> </span> {:lang('add')}
                                    </button>
                                </div>
                            </div>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <table class="table table-striped table-hover ntTable" v-cloak>
                    <thead>
                    <tr>
                        <th>{:lang('type')}</th>
                        <th>{:lang('content')}</th>
                        <th>{:lang('operate')}</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr v-for="(item,index) in linkarr">
                        <td>{{item.linkname}}</td>
                        <td>{{item.content}}</td>
                        <td class="text-right">
                            <div class="btn-group">
                                <button type="button" class="btn btn-default" @click="editfun(index)"><span
                                        class="glyphicon glyphicon-pencil"></span>{:lang('edit')}
                                </button>
                                <button type="button" class="btn btn-default" @click="delitem(item.id)"><span
                                        class="glyphicon glyphicon-trash"></span>{:lang('delete')}
                                </button>
                            </div>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <!--联系人添加的标志和添加的联系人id-->
        <input type="hidden" id="liaison" name="liaison" value="{$liaison|default=''}">
        <input type="hidden" name="linkid" id="linkid" value="{$linkid|default=''}">
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal"><span
                class="glyphicon glyphicon-remove"></span>{:lang('cancel')}
        </button>
        <button type="button" class="btn btn-primary" @click="savefun"
                style="padding-left:24px;padding-right:24px"><span
                class="glyphicon glyphicon-floppy-disk"></span>{:lang('save')}
        </button>
    </div>
</div>
<script src="/static/Admin/js/liaisoninfo.js"></script>